package com.goodo.card.api.common;


import org.apache.commons.lang3.StringUtils;

import java.io.Serializable;

/**
 * @author xuyanbo
 * @date 2018/3/11
 */
public class Result implements Serializable {

    private int code = 200;
    private String msg = "";
    private Object data;
    private String seqid;

    public Result(){}
    public Result(String seqid) {
        if(StringUtils.isNotBlank(seqid)) {
            this.seqid = seqid;
        } else {
            this.seqid = Util.uuid();
        }
    }
    public Result(int code, String msg, Object data, String seqid) {
        this.code = code;
        this.msg = msg;
        this.data = data;
        this.seqid = seqid;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public String getSeqid() {
        return seqid;
    }

    public void setSeqid(String seqid) {
        this.seqid = seqid;
    }
}
